package com.fili.gui.components;

import com.fili.core.storage.StorageContainer;
import com.toedter.calendar.JDateChooser;

import javax.swing.*;
import java.awt.*;
import java.util.Date;
import java.util.Locale;

/**
 * Created by Claudiu-Florin FILIMON
 * Date: Oct 18, 2006
 * Time: 8:57:35 PM
 */
public class TableView extends JComponent
{
    private JTable table;
    private DryTableModel tableModel;
    private StorageContainer storageContainer;
    private JDateChooser startDay;

    public TableView(StorageContainer storageContainer)
    {
        this.storageContainer = storageContainer;

        setLayout(new BorderLayout());
        tableModel = new DryTableModel();
        table = new JTable(tableModel);
        add(new JScrollPane(table), BorderLayout.CENTER);

        JPanel pnl = new JPanel(null);
        pnl.setPreferredSize(new Dimension(100, 100));


        startDay = new JDateChooser(new Date());
        startDay.setLocale(new Locale("ro", "RO"));
        startDay.setBounds(10, 10, 100, 20);
        pnl.add(startDay);


        add(pnl, BorderLayout.SOUTH);
    }
}
